widget
Type
object
Summary
A custom control written in LiveCode Builder
Syntax
widget
Description
Use the widget object type to create a widget control. Widgets are created from LiveCode Builder extensions that have previously been loaded into memory using the load extension command. For more details on how to create widgets, please consult the Extending Livecode guide.
Examples
set the visible of widget 1 to false
on newWidget
if the kind of the target is "com.livecode.widget.colorswatch" then
set the swatchColor of the target to "0,0,0,255"
end if
end newWidget
Related
command: load extension
glossary: object type, LiveCode Builder extension, command
keyword: control
Compatibility and Support
Introduced
LiveCode 8.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile
Associated Syntax
Command
Name | Summary | Syntax |
---|---|---|
create widget | Create a widget control of the specified kind. | create [invisible] widget [<controlName>] as <widgetKind> [in {<group>|<card>}] |
Message
Name | Summary | Syntax |
---|---|---|
deleteWidget | Sent to a widget just before it is removed from the stack. | deleteWidget |
newWidget | Sent to a new widget right after it's created. | newWidget |
Property
Name | Summary | Syntax |
---|---|---|
behavior | Allows an object to inherit its script handlers from another object. | set the behavior of <object> to {<button> | <stack>} |
overflowRect | Allows a script widget to render content outside its rect. | get the overflowRect of <script widget> set the overflowRect of <script widget> to <rect> |
kind | The unique identifier of a widget type. | get the kind of <widget> |